package com.joven.shelltest.utils.ruleExcute;

import org.springframework.stereotype.Service;

/**
 * @Author wzj
 * @Date 2023-11-22 09:14
 **/
@Service
public class HeightRule extends AbstractRule {

    @Override
    public boolean execute(RuleDto dto) {
        System.out.println("HeightRule is execute!");
        return dto.getHeight() <= 120;
    }

    @Override
    public String getRuleName() {
        return "HeightRule";
    }
}
